package com.zhou.base.components.feign.cloud.loadbalancer;

import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.CompletionContext;
import org.springframework.cloud.client.loadbalancer.LoadBalancerLifecycle;
import org.springframework.cloud.client.loadbalancer.Request;
import org.springframework.cloud.client.loadbalancer.Response;

public class MyBalancerLifecycle implements LoadBalancerLifecycle<Object, Object, ServiceInstance> {
    @Override
    public void onStart(Request<Object> request) {

        System.out.println("-- on start");
    }

    @Override
    public void onStartRequest(Request<Object> request, Response<ServiceInstance> lbResponse) {
        System.out.println("--  onStartRequest");

    }

    @Override
    public void onComplete(CompletionContext<Object, ServiceInstance, Object> completionContext) {
        System.out.println("-- onComplete");

    }
}
